package com.rico.kok.service;

import com.rico.kok.entity.PostLabel;
import com.rico.kok.mapper.PostLabelMapper;
import com.rico.kok.service.interf.PostLabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author：Rico_Skipper(JinYang Han)
 * @Date：2022/4/23 16:00
 */
@Service
public class PostLabelServiceImpl implements PostLabelService {

    @Autowired
    PostLabelMapper postLabelMapper;

    //为内容添加标签
    @Override
    @Transactional
    public int insetPostLabel(PostLabel postLabel) {
        return postLabelMapper.insertPostLabel(postLabel);
    }

    @Override
    public List<PostLabel> selectLabel(PostLabel postLabel) {
        return postLabelMapper.selectPostLabel(postLabel);
    }
}
